package ace.tool.generate.code.impl.resolver.scheme.resolver;

import ace.tool.generate.code.impl.resolver.scheme.model.dto.ProjectInfo;
import ace.tool.generate.code.impl.service.model.input.GenerateInput;
import lombok.RequiredArgsConstructor;

/**
 * @author caspar
 * @date 2023/11/17 10:34
 */
@RequiredArgsConstructor
public class ModuleProjectInfoResolver {
  private final GenerateInput input;

  public ProjectInfo resolve() {

    return ProjectInfoResolver.builder()
        .projectNamePrefix(input.getProjectNamePrefix())
        .projectNameSuffix(input.getApiProjectNameSuffix())
        .projectName(input.getProjectName())
        .projectRootDir(input.getProjectRootDir())
        .projectDisplayName(input.getProjectDisplayName())
        .build()
        .resolve();
  }
}
